package Demo;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Demo81 {
    public static void main(String[] args) {
        Map<Integer,String> m=new HashMap<>();
        m.put(1,"blade");
        m.put(2,"decade");
        m.put(3,"zio");
        Set<Map.Entry<Integer, String>> en = m.entrySet();
        Iterator<Map.Entry<Integer, String>> iter=en.iterator();
        for (Map.Entry<Integer,String> ee:en){
            System.out.println(ee+"***");
        }
        while (iter.hasNext()){
            Map.Entry<Integer, String> next = iter.next();
            System.out.println(next);
        }
    }
}
